﻿using Coolzon.UI.Core.Parts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Coolzon.UI.Core
{
    /// <summary>
    /// 命中测试结果
    /// </summary>
    public struct XHitResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool IsSuccess;

        /// <summary>
        /// 命中的组件实例对象
        /// </summary>
        public Widget Part;

        /// <summary>
        /// 测试点在组件实例中的偏移值
        /// </summary>
        public Point Offset;

        public XHitResult(bool isSuccess, Widget part, Point offset)
        {
            IsSuccess = isSuccess;
            Part = part;
            Offset = offset;
        }
    }
}
